//
//  BNDOfficeDocClassifyView.m
//  OfficeDoc
//
//  Created by pie on 2022/4/1.
//  Copyright © 2022 pie. All rights reserved.
//

#import "BNDOfficeDocClassifyView.h"
#import "LKNavBarTitleMenu.h"
#import "BNDOfficeDocKit.h"

@interface BNDOfficeDocClassifyView ()
@property (strong, nonatomic) LKNavBarTitleMenu *navBarTitleMenu;
@end

@implementation BNDOfficeDocClassifyView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = UIColor.whiteColor;
        
        [self addSubview:self.navBarTitleMenu];
        [self.navBarTitleMenu mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(self.mas_left).offset(16);
            make.right.mas_equalTo(self.mas_right).offset(-16);
            make.height.mas_equalTo(30);
            make.bottom.mas_equalTo(self.mas_bottom).offset(-16);
        }];
    }
    return self;
}


- (LKNavBarTitleMenu *)navBarTitleMenu
{
    if (!_navBarTitleMenu) {
        _navBarTitleMenu = [[LKNavBarTitleMenu alloc] initWithTitles:[NSArray array]];
        _navBarTitleMenu.menuStyle = BNDMenuStyleList;
        [_navBarTitleMenu setContainerMaxWidth:kDeviceWidth-32];
        [_navBarTitleMenu setFirstButtonLeftMargin:0];
        [_navBarTitleMenu setFontNormal:BNDPFRegularFont(13)];
        [_navBarTitleMenu setFontLarge:BNDPFRegularFont(13)];
        [_navBarTitleMenu setTitleNormalFont:BNDPFRegularFont(13)];
        [_navBarTitleMenu setTitleSelectedFont:BNDPFRegularFont(13)];
        [_navBarTitleMenu setTitleNormalColor:UIColorWithHex(0x34363B)];
        [_navBarTitleMenu setTitleSelectedColor:UIColorWithHex(0x3770EB)];
        [_navBarTitleMenu setButtonMargin:8];
        [_navBarTitleMenu setLineBottomMargin:0];
        [_navBarTitleMenu setLineMinWidth:20];
        [_navBarTitleMenu.sliderLine setHidden:YES];
        [_navBarTitleMenu.sliderLine setBackgroundColor:UIColorWithHex(0xC17BE5)];
        [_navBarTitleMenu setAlpha:1.0f];
        _navBarTitleMenu.backgroundColor = UIColor.redColor;
        _navBarTitleMenu.sliderLine.frame = CGRectMake(0, 36, 20, 4);
        _navBarTitleMenu.backgroundColor = UIColor.clearColor;
        _navBarTitleMenu.layer.masksToBounds = YES;
        _navBarTitleMenu.frame = CGRectMake(16, 8, kDeviceWidth-32, 30);
        _navBarTitleMenu.titles = [NSMutableArray arrayWithArray:@[@"在线用户",@"全部用户",@"在线用户",@"全部用户"]];
        [_navBarTitleMenu setMenuPressedButtonBlock:^(LKNavBarTitleMenu *headerView, NSInteger index){
        }];
    }
    
    return _navBarTitleMenu;
}
@end
